<?php
class DBManager {
    var $conect;

    var $BaseDatos;
    var $Servidor;
    var $Usuario;
    var $Clave;
    function DBManager() {
        $this->BaseDatos = "sema4";
        $this->Servidor = "74.207.234.233:3010";
        $this->Usuario = "temporal";
        $this->Clave = "MgGroupRemoto";
//        $this->BaseDatos = "sema4";
//        $this->Servidor = "localhost";
//        $this->Usuario = "sema";
//        $this->Clave = "3s2e1ma";
    }

    function conectar() {
        if(!($con=@mysql_connect($this->Servidor,$this->Usuario,$this->Clave))) {
            echo"<h1> [:(] Error al conectar a la base de datos</h1>";
            exit();
        }
        if (!@mysql_select_db($this->BaseDatos,$con)) {
            echo "<h1> [:(] Error al seleccionar la base de datos</h1>";
            exit();
        }
        $this->conect=$con;
        return true;
    }
}
?>
